import React from 'react';
import { Cascader } from 'antd';
import './index.less'
interface CitySelectorProps {
    provinceCityData: any[];
    handleCityChange: (selectedArea: string[]) => void;
}

const CitySelector: React.FC<CitySelectorProps> = ({
    provinceCityData,
    handleCityChange
}) => {
    return (
        <div style={{ display: 'flex', alignItems: 'center', paddingBottom: '30px' }}>
            <span>选择城市：</span>
            <Cascader
                defaultValue={['310000']}
                options={provinceCityData}
                onChange={handleCityChange}
                placeholder="请选择省市区"
                style={{ width: 300 }}
            />
        </div>
    );
};

export default CitySelector;
